#pragma once

#include "stdafx.h"

namespace GraphTools
{
	template<class T>
	class MyVector
	{
		vector<T> elems;
	public:
		MyVector()
			: elems(vector<T>()) { }
		MyVector(int size)
			: elems(vector<T>(size)) { }
		int size()
		{
			return elems.size();
		}
		void push_back(const T &elem)
		{
			elems.push_back(elem);
		}
		void pop_back()
		{
			elems.pop_back();
		}
		void reverse()
		{
			std::reverse(elems.begin(), elems.end()); 
		}
		T &operator [](const int b)
		{
			if (b >= 0)
				return elems[b];
			else
			{
				return elems[b + elems.size()];
			}
		}
	};

	class boolean
	{
	public:
		boolean() : state(false)
		{ }
		boolean(bool state) : state(state)
		{ }
		operator bool () const
		{
			return state;
		}
	private:
		bool state;
	};

	class EdmondsEdge 
	{
		MyVector<int> elems;
	public:
		EdmondsEdge();
		EdmondsEdge(int i, int j, int w);
		int operator [](const int b);
	};
}
